package com.smasher.mqtt.message;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class LastWillMessage implements IMessage {

    private String terminalUid;

    public LastWillMessage() {
    }

    public LastWillMessage(String terminalUid) {
        this.terminalUid = terminalUid;
    }

    public String getTerminalUid() {
        return terminalUid;
    }

    public void setTerminalUid(String terminalUid) {
        this.terminalUid = terminalUid;
    }

    @Override
    public byte[] pack() {
        Gson gson = new GsonBuilder().create();
        String message = gson.toJson(this);
        return message.getBytes();
    }
}
